import dayjs from 'dayjs'
import relativeTime from 'dayjs/plugin/relativeTime'
import 'dayjs/locale/zh-cn'
dayjs.locale('zh-cn')
export const getTime = (targettime) => {
  dayjs.extend(relativeTime)

  const a = dayjs()
  const b = dayjs(targettime)
  return a.to(b)
}
